package top.z.work.module.system.controller.role.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

@Data
@Accessors(chain = true)
@Schema(description = "系统管理 - 创建角色数据 VO")
public class SystemRoleCreateVO {

    @Length(min = 1, max = 50, message = "角色名称长度只能在1到50个字符之间")
    @NotBlank(message = "角色名称不能为空")
    @Schema(description = "角色名称", example = "管理员")
    private String name;

    @Length(min = 1, max = 50, message = "角色标识长度只能在1到50个字符之间")
    @NotBlank(message = "角色标识不能为空")
    @Schema(description = "角色标识", example = "admin")
    private String code;

    @Min(value = 0, message = "角色排序只能是 0 或者 99999 之间的数字")
    @Max(value = 99999, message = "角色排序只能是 0 或者 99999 之间的数字")
    @NotNull(message = "角色排序不能为空")
    @Schema(description = "角色排序", example = "1")
    private Integer sort;

    @NotNull(message = "数据范围不能为空")
    @Schema(description = "数据范围", example = "0")
    private Integer scope;

}
